* Set working directory to folder name *
sysdir set PLUS ~/ado/plus
sysdir set PERSONAL ~/ado/personal
ssc install lincomest
cd "F:\awei\Spring\Replication data\Submission files\Data"

* Figure 1 *
use "Figure 1 data.dta", clear

reg SEXISM ques1

reg SEXISM_rank ques1_rank

reg SEXISM ques2

reg SEXISM_rank ques2_rank

* Table 2, Panel A *
use "cross sectional data.dta", clear
keep wage_gap SEXISM female_married female_nchild home_hours_diff employ female_employ lfp female_LFP college_diff
order wage_gap SEXISM female_married female_nchild home_hours_diff employ female_employ lfp female_LFP college_diff
sum

* Table 2, Panel B *
use "panel data.dta", clear
keep wage_gap SEXISM female_married female_nchild home_hours_diff employ female_employ lfp female_LFP college_diff
order wage_gap SEXISM female_married female_nchild home_hours_diff employ female_employ lfp female_LFP college_diff
sum

* Table 2, Panel C *
use "IV data.dta", clear
keep wage_gap SEXISM1 nearest_mean per_married_birth per_child_birth home_hours_diff_birth_state SEXISM_dest female_married female_nchild home_hours_diff employ female_employ lfp female_LFP college_diff
order wage_gap SEXISM1 nearest_mean per_married_birth per_child_birth home_hours_diff_birth_state SEXISM_dest female_married female_nchild home_hours_diff employ female_employ lfp female_LFP college_diff
sum

***************
*** Table 3 ***
***************
use "cross sectional data.dta", clear

* column 1 *
reg wage_gap c.SEXISM employ lfp college_diff [aweight = wage_gap_se], vce(cluster state)
sum wage_gap 
local mean_wage_gap = r(mean)
sum SEXISM
local min_sexism = r(min)
local existing_wage_gap = 100 - exp(-`mean_wage_gap')*100
local direct_cents = (-exp(-`mean_wage_gap') + exp(-`mean_wage_gap' +(_b[SEXISM]*(-`min_sexism'))))*100
local direct_percent = `direct_cents'/`existing_wage_gap'
local direct_percent = `direct_percent' * 100
local direct_cents = round(`direct_cents', .01)
local direct_percent = round(`direct_percent', .01)
dis "`direct_cents'"
dis "`direct_percent'"

* column 2 *
reg wage_gap c.SEXISM employ lfp female_employ female_LFP college_diff [aweight = wage_gap_se], vce(cluster state)
sum wage_gap 
local mean_wage_gap = r(mean)
sum SEXISM
local min_sexism = r(min)
local existing_wage_gap = 100 - exp(-`mean_wage_gap')*100
local direct_cents = (-exp(-`mean_wage_gap') + exp(-`mean_wage_gap' +(_b[SEXISM]*(-`min_sexism'))))*100
local direct_percent = `direct_cents'/`existing_wage_gap'
local direct_percent = `direct_percent' * 100
local direct_cents = round(`direct_cents', .01)
local direct_percent = round(`direct_percent', .01)
dis "`direct_cents'"
dis "`direct_percent'"

* column 3 *
reg wage_gap c.SEXISM employ lfp female_employ female_LFP college_diff female_married [aweight = wage_gap_se], vce(cluster state)
sum wage_gap 
local mean_wage_gap = r(mean)
sum SEXISM
local min_sexism = r(min)
local existing_wage_gap = 100 - exp(-`mean_wage_gap')*100
local direct_cents = (-exp(-`mean_wage_gap') + exp(-`mean_wage_gap' +(_b[SEXISM]*(-`min_sexism'))))*100
local direct_percent = `direct_cents'/`existing_wage_gap'
local direct_percent = `direct_percent' * 100
local direct_cents = round(`direct_cents', .01)
local direct_percent = round(`direct_percent', .01)
dis "`direct_cents'"
dis "`direct_percent'"

reg wage_gap c.SEXISM employ lfp female_employ female_LFP college_diff [aweight = wage_gap_se]
estimates store reg1
reg wage_gap c.SEXISM employ lfp female_employ female_LFP college_diff female_married [aweight = wage_gap_se]
estimates store reg2
suest reg1 reg2, cluster(state)
lincomest [reg2_mean]SEXISM - [reg1_mean]SEXISM
suest reg1 reg2, cluster(state)
local percent = (([reg2_mean]SEXISM - [reg1_mean]SEXISM)/[reg1_mean]SEXISM)*100
local percent = round(-`percent', .01)
dis "`percent'"

* column 4 *
reg wage_gap c.SEXISM employ lfp female_employ female_LFP college_diff female_nchild [aweight = wage_gap_se], vce(cluster state)
sum wage_gap 
local mean_wage_gap = r(mean)
sum SEXISM
local min_sexism = r(min)
local existing_wage_gap = 100 - exp(-`mean_wage_gap')*100
local direct_cents = (-exp(-`mean_wage_gap') + exp(-`mean_wage_gap' +(_b[SEXISM]*(-`min_sexism'))))*100
local direct_percent = `direct_cents'/`existing_wage_gap'
local direct_percent = `direct_percent' * 100
local direct_cents = round(`direct_cents', .01)
local direct_percent = round(`direct_percent', .01)
dis "`direct_cents'"
dis "`direct_percent'"

reg wage_gap c.SEXISM employ lfp female_employ female_LFP college_diff [aweight = wage_gap_se]
estimates store reg1
reg wage_gap c.SEXISM employ lfp female_employ female_LFP college_diff female_nchild [aweight = wage_gap_se]
estimates store reg2
suest reg1 reg2, cluster(state)
lincomest [reg2_mean]SEXISM - [reg1_mean]SEXISM
suest reg1 reg2, cluster(state)
local percent = (([reg2_mean]SEXISM - [reg1_mean]SEXISM)/[reg1_mean]SEXISM)*100
local percent = round(-`percent', .01)
dis "`percent'"

* column 5 *
reg wage_gap c.SEXISM employ lfp female_employ female_LFP college_diff home_hours_diff [aweight = wage_gap_se], vce(cluster state)
sum wage_gap 
local mean_wage_gap = r(mean)
sum SEXISM
local min_sexism = r(min)
local existing_wage_gap = 100 - exp(-`mean_wage_gap')*100
local direct_cents = (-exp(-`mean_wage_gap') + exp(-`mean_wage_gap' +(_b[SEXISM]*(-`min_sexism'))))*100
local direct_percent = `direct_cents'/`existing_wage_gap'
local direct_percent = `direct_percent' * 100
local direct_cents = round(`direct_cents', .01)
local direct_percent = round(`direct_percent', .01)
dis "`direct_cents'"
dis "`direct_percent'"

reg wage_gap c.SEXISM employ lfp female_employ female_LFP college_diff [aweight = wage_gap_se]
estimates store reg1
reg wage_gap c.SEXISM employ lfp female_employ female_LFP college_diff home_hours_diff [aweight = wage_gap_se]
estimates store reg2
suest reg1 reg2, cluster(state)
lincomest [reg2_mean]SEXISM - [reg1_mean]SEXISM
suest reg1 reg2, cluster(state)
local percent = (([reg2_mean]SEXISM - [reg1_mean]SEXISM)/[reg1_mean]SEXISM)*100
local percent = round(-`percent', .01)
dis "`percent'"

***************
*** Table 4 ***
***************

* column 1 *
use "cross sectional data.dta", clear
drop wage_gap wage_gap_se
merge 1:m dmacode using "wage gaps by college.dta", nogenerate
gen SEXISM_coll = SEXISM * college
reg wage_gap SEXISM SEXISM_coll college employ lfp female_employ female_LFP college_diff [aweight = wage_gap_se], vce(cluster state)

* column 2 *
use "cross sectional data.dta", clear
drop wage_gap wage_gap_se
merge 1:m dmacode using "wage gaps by industry.dta", nogenerate
gen SEXISM_manu = SEXISM * manu
gen SEXISM_comm = SEXISM * comm
reg wage_gap SEXISM SEXISM_manu SEXISM_comm employ lfp female_employ female_LFP college_diff manu comm [aweight = wage_gap_se], vce(cluster state)

* column 3 *
use "cross sectional data.dta", clear
drop wage_gap wage_gap_se
merge 1:m dmacode using "wage gaps by gender diversity.dta", nogenerate
gen SEXISM_diverse = SEXISM * diverse
reg wage_gap SEXISM SEXISM_diverse diverse employ lfp female_employ female_LFP college_diff [aweight = wage_gap_se], vce(cluster state)

* column 4 *
use "cross sectional data.dta", clear
drop wage_gap wage_gap_se
merge 1:m dmacode using "wage gaps by race.dta", nogenerate
gen SEXISM_black = SEXISM * black
reg wage_gap SEXISM SEXISM_black black employ lfp female_employ female_LFP college_diff [aweight = wage_gap_se], vce(cluster state)

***************
*** Table 5 ***
***************
use "cross sectional data.dta", clear

* column 1 *
ivreg2 wage_gap (c.SEXISM = SEXISM1 nearest_mean) employ lfp college_diff [aweight = wage_gap_se], cluster(state) 
local p_value = `e(jp)'
local p_value = round(`p_value', .01)
local f_stat = `e(rkf)'
local f_stat = round(`f_stat', .01)
dis "`p_value'"
dis "`f_stat'"

* column 2 *
ivreg2 wage_gap (c.SEXISM = SEXISM1 nearest_mean) employ lfp female_employ female_LFP college_diff [aweight = wage_gap_se], cluster(state)
local p_value = `e(jp)'
local p_value = round(`p_value', .01)
local f_stat = `e(rkf)'
local f_stat = round(`f_stat', .01)
dis "`p_value'"
dis "`f_stat'"

* column 3 *
ivreg2 wage_gap (c.SEXISM = ex_SEXISM1 ex_nearest_mean) employ lfp college_diff [aweight = wage_gap_se], cluster(state)
local p_value = `e(jp)'
local p_value = round(`p_value', .01)
local f_stat = `e(rkf)'
local f_stat = round(`f_stat', .01)
dis "`p_value'"
dis "`f_stat'"

* column 4 *
ivreg2 wage_gap (c.SEXISM = ex_SEXISM1 ex_nearest_mean) employ lfp female_employ female_LFP college_diff [aweight = wage_gap_se], cluster(state)
local p_value = `e(jp)'
local p_value = round(`p_value', .01)
local f_stat = `e(rkf)'
local f_stat = round(`f_stat', .01)
dis "`p_value'"
dis "`f_stat'"

* column 5 *
ivreg2 wage_gap (c.SEXISM = SEXISM1 nearest_mean) employ lfp college_diff wage_gap1 nearest_wage_gap [aweight = wage_gap_se], cluster(state) 
local p_value = `e(jp)'
local p_value = round(`p_value', .01)
local f_stat = `e(rkf)'
local f_stat = round(`f_stat', .01)
dis "`p_value'"
dis "`f_stat'"

* column 6 *
ivreg2 wage_gap (c.SEXISM = SEXISM1 nearest_mean) employ lfp female_employ female_LFP college_diff wage_gap1 nearest_wage_gap [aweight = wage_gap_se], cluster(state)
local p_value = `e(jp)'
local p_value = round(`p_value', .01)
local f_stat = `e(rkf)'
local f_stat = round(`f_stat', .01)
dis "`p_value'"
dis "`f_stat'"

***************
*** Table 6 ***
***************
use "panel data.dta", clear

* column 1 *
reg wage_gap SEXISM employ lfp college_diff i.dmacode i.year [aweight = wage_gap_se], vce(cluster state)

* column 2 *
reg wage_gap c.SEXISM employ lfp college_diff female_LFP female_employ i.dmacode i.year [aweight = wage_gap_se], vce(cluster state)

* column 3 *
reg wage_gap c.SEXISM employ lfp college_diff female_LFP female_employ female_married i.dmacode i.year [aweight = wage_gap_se], vce(cluster state)

* column 4 *
reg wage_gap c.SEXISM employ lfp college_diff female_LFP female_employ female_nchild i.dmacode i.year [aweight = wage_gap_se], vce(cluster state)

* column 5 *
reg wage_gap c.SEXISM employ lfp college_diff female_LFP female_employ home_hours_diff i.dmacode i.year [aweight = wage_gap_se], vce(cluster state)

***************
*** Table 7 ***
***************
use "IV data.dta", clear

* column 1 *
ivreg2 wage_gap (c.SEXISM_dest female_married = SEXISM1 nearest_mean per_married_birth) employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest)
local p_value = `e(jp)'
local p_value = round(`p_value', .01)
local f_stat = `e(rkf)'
local f_stat = round(`f_stat', .01)
dis "`p_value'"
dis "`f_stat'"

* column 2 *
ivreg2 female_married (c.SEXISM_dest = SEXISM1 nearest_mean) wage_gap employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest) first
local p_value = `e(jp)'
local p_value = round(`p_value', .01)
local f_stat = `e(rkf)'
local f_stat = round(`f_stat', .01)
dis "`p_value'"
dis "`f_stat'"

* column 3 *
ivreg2 wage_gap (c.SEXISM_dest female_nchild = SEXISM1 nearest_mean per_child_birth) employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest)
local p_value = `e(jp)'
local p_value = round(`p_value', .01)
local f_stat = `e(rkf)'
local f_stat = round(`f_stat', .01)
dis "`p_value'"
dis "`f_stat'"

* column 4 *
ivreg2 female_nchild (c.SEXISM_dest = SEXISM1 nearest_mean) wage_gap employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest)
local p_value = `e(jp)'
local p_value = round(`p_value', .01)
local f_stat = `e(rkf)'
local f_stat = round(`f_stat', .01)
dis "`p_value'"
dis "`f_stat'"

* column 5 *
ivreg2 wage_gap (c.SEXISM_dest home_hours_diff = SEXISM1 nearest_mean home_hours_diff_birth_state) employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest)
local p_value = `e(jp)'
local p_value = round(`p_value', .01)
local f_stat = `e(rkf)'
local f_stat = round(`f_stat', .01)
dis "`p_value'"
dis "`f_stat'"

* column 6 *
ivreg2 home_hours_diff (c.SEXISM_dest = SEXISM1 nearest_mean) wage_gap employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest)
local p_value = `e(jp)'
local p_value = round(`p_value', .01)
local f_stat = `e(rkf)'
local f_stat = round(`f_stat', .01)
dis "`p_value'"
dis "`f_stat'"

* indirect costs of sexism: via women married *
ivreg2 wage_gap (c.SEXISM_dest female_married = SEXISM1 nearest_mean per_married_birth) employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest)
local sexism_direct_coeff = _b[SEXISM_dest]
local female_married_coeff = _b[female_married]
ivreg2 female_married (c.SEXISM_dest = SEXISM1 nearest_mean) wage_gap employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest)
local sexism_indirect_coeff = _b[SEXISM_dest]
sum wage_gap 
local mean_wage_gap = r(mean)
sum SEXISM_dest
local min_sexism = r(min)
local existing_wage_gap = 100 - exp(-`mean_wage_gap')*100
local indirect_cents = (-exp(-`mean_wage_gap') + exp(-`mean_wage_gap' +(`female_married_coeff')*(-`min_sexism')*`sexism_indirect_coeff'))*100
dis "`indirect_cents'"

* indirect costs of sexism: via children *
ivreg2 wage_gap (c.SEXISM_dest female_nchild = SEXISM1 nearest_mean per_child_birth) employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest)
local sexism_direct_coeff = _b[SEXISM_dest]
local female_nchild_coeff = _b[female_nchild]
ivreg2 female_nchild (c.SEXISM_dest = SEXISM1 nearest_mean) wage_gap employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest)
local sexism_indirect_coeff = _b[SEXISM_dest]
sum wage_gap 
local mean_wage_gap = r(mean)
sum SEXISM_dest
local min_sexism = r(min)
local existing_wage_gap = 100 - exp(-`mean_wage_gap')*100
local indirect_cents = (-exp(-`mean_wage_gap') + exp(-`mean_wage_gap' +(`female_nchild_coeff')*(-`min_sexism')*`sexism_indirect_coeff'))*100
dis "`indirect_cents'"

* indirect costs of sexism: via home hours gap *
ivreg2 wage_gap (c.SEXISM_dest home_hours_diff = SEXISM1 nearest_mean home_hours_diff_birth_state) employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest)
local sexism_direct_coeff = _b[SEXISM_dest]
local home_hours_coeff = _b[home_hours_diff]
ivreg2 home_hours_diff (c.SEXISM_dest = SEXISM1 nearest_mean) wage_gap employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest)
local sexism_indirect_coeff = _b[SEXISM_dest]
sum wage_gap 
local mean_wage_gap = r(mean)
sum SEXISM_dest
local min_sexism = r(min)
local existing_wage_gap = 100 - exp(-`mean_wage_gap')*100
local indirect_cents = (-exp(-`mean_wage_gap') + exp(-`mean_wage_gap' +(`home_hours_coeff')*(-`min_sexism')*`sexism_indirect_coeff'))*100
dis "`indirect_cents'"

***************
*** Table 8 ***
***************
use "IV data.dta", clear

gmm (eq1: wage_gap - {xb: SEXISM_dest female_married home_hours_diff female_LFP employ lfp female_employ_rate college_diff origin_wage_gap _cons}) ///
	(eq2: female_married - {xc: SEXISM_dest female_LFP employ lfp female_employ_rate college_diff wage_gap origin_wage_gap _cons}) ///
	(eq3: home_hours_diff - {xd: SEXISM_dest female_LFP employ lfp female_employ_rate college_diff female_married wage_gap origin_wage_gap  _cons}) ///
	[aweight = wage_gap_se], ///
	vce(cluster state_dest) ///
	instruments(eq1: SEXISM1 nearest_mean per_married_birth home_hours_diff_birth_state female_LFP employ lfp female_employ_rate college_diff origin_wage_gap) ///
	instruments(eq2: SEXISM1 nearest_mean female_LFP employ lfp female_employ_rate college_diff wage_gap origin_wage_gap) ///
	instruments(eq3: SEXISM1 nearest_mean female_LFP employ lfp female_employ_rate college_diff per_married_birth wage_gap origin_wage_gap) ///
	igmm winitial(unadjusted, indep)	
estat overid
local p_value = `r(J_p)'

* mean wage gap *
sum wage_gap 
local mean_wage_gap = r(mean)
sum SEXISM_dest
local min_sexism = r(min)

* existing wage gap *
local existing_wage_gap = 100 - exp(-`mean_wage_gap')*100

* direct effect, cents *
local direct_cents = (-exp(-`mean_wage_gap') + exp(-`mean_wage_gap' +(_b[xb:SEXISM_dest]*(-`min_sexism'))))*100

* direct effect, percent *
local direct_percent = `direct_cents'/`existing_wage_gap'
local direct_percent = `direct_percent' * 100

* indirect effect, home hours, cents *
local home_hours_cents = (-exp(-`mean_wage_gap') + exp(-`mean_wage_gap' +(_b[xb:home_hours_diff])*(-`min_sexism')*(_b[xd:SEXISM_dest])))*100

* indirect effect, home hours, percent *
local home_hours_percent = `home_hours_cents'/`existing_wage_gap'
local home_hours_percent = `home_hours_percent' * 100

* indirect effect, marriage through home hours, cents *
local marriage_home_hours_cents = (-exp(-`mean_wage_gap') + exp(-`mean_wage_gap' +(_b[xc:SEXISM_dest])*(-`min_sexism')*(_b[xd:female_married])*(_b[xb:home_hours_diff])))*100

* indirect effect, marriage through home hours, percent *
local marriage_home_hours_percent = `marriage_home_hours_cents'/`existing_wage_gap'
local marriage_home_hours_percent = `marriage_home_hours_percent' * 100

* net indirect effect cents *
local net_indirect_cents = `home_hours_cents' + `marriage_home_hours_cents'

* net indirect effect percent *
local net_indirect_percent = `home_hours_percent' + `marriage_home_hours_percent'

* total net effect cents *
local net_total_cents = `net_indirect_cents' + `direct_cents'

* total net percent *
local net_total_percent = `net_indirect_percent' + `direct_percent'

* percent of effect indirect *
local percent_indirect = `net_indirect_percent'/`net_total_percent'

* rounding *
local direct_cents = round(`direct_cents', .01)
local direct_percent = round(`direct_percent', .01)
local home_hours_cents = round(`home_hours_cents', .01)
local home_hours_percent = round(`home_hours_percent', .01)
local marriage_home_hours_cents = round(`marriage_home_hours_cents', .01)
local marriage_home_hours_percent = round(`marriage_home_hours_percent', .01)
local net_indirect_cents = round(`net_indirect_cents', .01)
local net_indirect_percent = round(`net_indirect_percent', .01)
local net_total_cents = round(`net_total_cents', .01)
local net_total_percent = round(`net_total_percent', .01)
local percent_indirect = round(`percent_indirect', .01)

dis "`p_value'"
dis "`direct_cents'"
dis "`direct_percent'"
dis "`home_hours_cents'"
dis "`home_hours_percent'"
dis "`marriage_home_hours_cents'"
dis "`marriage_home_hours_percent'"
dis "`net_indirect_cents'"
dis "`net_indirect_percent'"
dis "`net_total_cents'"
dis "`net_total_percent'"
dis "`percent_indirect'"

***************
*** Table 9 ***
***************
use "cross sectional data.dta", clear

* column 1 *
reg female_wage c.SEXISM employ lfp college_diff male_wage [aweight = female_wage_se], vce(cluster state)
reg male_wage c.SEXISM employ lfp college_diff female_wage [aweight = male_wage_se], vce(cluster state)

* column 2 *
reg female_wage c.SEXISM employ lfp female_employ female_LFP college_diff male_wage [aweight = female_wage_se], vce(cluster state)
reg male_wage c.SEXISM employ lfp female_employ female_LFP college_diff female_wage [aweight = male_wage_se], vce(cluster state)

* column 3 *
reg female_wage c.SEXISM employ lfp female_married female_employ female_LFP college_diff male_wage [aweight = female_wage_se], vce(cluster state)
reg male_wage c.SEXISM employ lfp female_married female_employ female_LFP college_diff female_wage [aweight = male_wage_se], vce(cluster state)

* column 4 *
reg female_wage c.SEXISM female_nchild employ lfp female_employ female_LFP college_diff male_wage [aweight = female_wage_se], vce(cluster state)
reg male_wage c.SEXISM female_nchild employ lfp female_employ female_LFP college_diff female_wage [aweight = male_wage_se], vce(cluster state)

* column 5 *
reg female_wage c.SEXISM employ lfp female_employ female_LFP college_diff home_hours_diff male_wage [aweight = female_wage_se], vce(cluster state)
reg male_wage c.SEXISM employ lfp female_employ female_LFP college_diff home_hours_diff female_wage [aweight = male_wage_se], vce(cluster state)

******************
*** Appendix C ***
******************
use "wage gap ranking.dta", clear
gsort - wage_ratio
keep in 1/10

use "wage gap ranking.dta", clear
gsort + wage_ratio
keep in 1/10

******************
*** Appendix D ***
******************

use "individual level data.dta", clear
reg wage_resid female_dummy##c.SEXISM employ lfp college_diff [aweight = wage_resid_se], vce(cluster state)

reg wage_resid female_dummy##c.SEXISM employ lfp college_diff female_employ female_LFP [aweight = wage_resid_se], vce(cluster state)


******************
*** Appendix E ***
******************
use "IV data.dta", clear

* column 1 and 2 *
ivreg2 wage_gap (c.SEXISM_dest female_married = SEXISM1 nearest_mean per_married_birth) employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest) first

* column 3 *
ivreg2 female_married (c.SEXISM_dest = SEXISM1 nearest_mean) wage_gap employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest) first

* column 4 and 5 *
ivreg2 wage_gap (c.SEXISM_dest female_nchild = SEXISM1 nearest_mean per_child_birth) employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest) first

* column 6 *
ivreg2 female_nchild (c.SEXISM_dest = SEXISM1 nearest_mean) wage_gap employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest) first

* column 7 and 8 *
ivreg2 wage_gap (c.SEXISM_dest home_hours_diff = SEXISM1 nearest_mean home_hours_diff_birth_state) employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest) first

* column 9 *
ivreg2 home_hours_diff (c.SEXISM_dest = SEXISM1 nearest_mean) wage_gap employ lfp female_employ_rate female_LFP college_diff origin_wage_gap [aweight = wage_gap_se], cluster(state_dest) first


******************
*** Appendix F ***
******************
use "cross sectional data.dta", clear

* column 1 *
reg wage_gap c.SEXISM RELIGION employ lfp college_diff [aweight = wage_gap_se], vce(cluster state)

* column 2 *
reg wage_gap c.SEXISM RELIGION employ lfp female_employ female_LFP college_diff [aweight = wage_gap_se], vce(cluster state)

* column 3 *
reg wage_gap c.SEXISM male_index employ lfp college_diff [aweight = wage_gap_se], vce(cluster state)

* column 4 *
reg wage_gap c.SEXISM male_index employ lfp female_employ female_LFP college_diff [aweight = wage_gap_se], vce(cluster state)

* column 5 *
reg wage_gap c.SEXISM definitions_index employ lfp college_diff [aweight = wage_gap_se], vce(cluster state)

* column 6 *
reg wage_gap c.SEXISM definitions_index employ lfp female_employ female_LFP college_diff [aweight = wage_gap_se], vce(cluster state)

* column 7 *
reg wage_gap c.SEXISM per_employ_change employ lfp college_diff [aweight = wage_gap_se], vce(cluster state)

* column 8 *
reg wage_gap c.SEXISM per_employ_change employ lfp female_employ female_LFP college_diff [aweight = wage_gap_se], vce(cluster state)




